function Util(){
	this.init();
}
Util.prototype={
	init: function(){
		
	},
	//获取url中的参数
    getUrlParam: function(name, url) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        url = url || window.location.search.substr(1).match(reg);  //匹配目标参数
        if (url != null) return unescape(url[2]); return null; //返回参数值
    },
    getUrlParams: function(){
    	var url = window.location.href;  //匹配目标参数
    	if(url != null)
    		return url.substr(url.indexOf("?"), url.length);
    },
    //获取当天日期
	getNowFormatDate: function(year, month, day) {
		year = year || 0;
		month = month || 0;
		day = day || 0;
		var date = new Date();
		date.setFullYear(date.getFullYear() + year);
		date.setMonth(date.getMonth() + month);
		date.setDate(date.getDate()+day);//获取day天后的日期 
		var seperator1 = "-";
		var seperator2 = ":";
		var month = date.getMonth() + 1;
		var strDate = date.getDate();
		if(month >= 1 && month <= 9) {
			month = "0" + month;
		}
		if(strDate >= 0 && strDate <= 9) {
			strDate = "0" + strDate;
		}
		var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate ;//+ " " + date.getHours() + seperator2 + date.getMinutes();
		return currentdate;
	},
    requestRemoteDate: function(url, data, callback){
		console.log("url --> " + url);
		console.log("data --> " + JSON.stringify(data))
		$.ajax({
	        url: url,
	        type: 'GET',
	        dataType: "json",
	        data: data,
	        success: callback,
	        error: function (data,t,e) {
	        	console.log("data --> " + JSON.stringify(data));
	        	console.log("data --> " + JSON.stringify(e));
	        	var status = data.status;
	        	console.log(url + "获取数据失败!");
	        }
	    });
	},
	requestRemoteDateJsonP: function(url, data, callback){
		$.ajax({ 
			url: url,
			type: 'GET',
			async: false,
			dataType: "jsonp",
			jsonp: "callback", //服务端用于接收callback调用的function名的参数(请使用callback或jsonp)
			jsonpCallback: "success_jsonpCallback", //callback的function名称
			data: data,
			success: callback,
			error: function (data,t,e) {
	        	console.log("data --> " + JSON.stringify(data));
	        	console.log("data --> " + JSON.stringify(e));
	        	var status = data.status;
	        	console.log(url + "获取数据失败!");
	        }
		});
	},
	log:function(data){
		console.log(data);
	},
	logURL:function(url){
		console.log("url --> "+url);
	},
	logParameter:function(data){
		console.log("parameter --> "+JSON.stringify(data));
	},
	logResult:function(result){
		console.log("result --> "+JSON.stringify(result));
	},
	logResult:function(params, result){
		console.log(params+" --> "+JSON.stringify(result));
	}
}